package repositories

import (
	"github.com/goAdminMicroService/internal/pkg/models"
	"github.com/jinzhu/gorm"
	"go.uber.org/zap"
)

type DetailsRepository interface {
	Get(id uint64) (*models.Detail, error)
}

type MysqlDetailsRepository struct {
	logger *zap.Logger
	db     *gorm.DB
}

func NewMysqlDetailsRepository(logger *zap.Logger, db *gorm.DB) DetailsRepository {
	return &MysqlDetailsRepository{
		logger: logger.With(zap.String("type", "DetailsRepository")),
		db:     db,
	}
}

func (s *MysqlDetailsRepository) Get(id uint64) (*models.Detail, error) {
	m := new(models.Detail)
	m.Name = "details hello world"
	m.ID = 1
	return m, nil
}
